package org.opens.interfaces;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class PrintInterfacesLogScheduled {

    /**
     * 每2秒打印一次日志
     */
    @Scheduled(cron ="*/2 * * * * ?")
    public void printLog() {
        log.debug("Interfaces debug level log.");
        log.info("Interfaces info level log.");
        log.warn("Interfaces warn level log.");
        log.error("Interfaces error level log.");
    }

}
